package magazzino.web.ricercaOrdine;

import java.util.Collection;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import fr.improve.struts.taglib.layout.datagrid.Datagrid;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import to.pm.entity.acquisti.Fornitore;
import to.pm.entity.acquisti.OrdineEsterno;

public class RicercaOrdineForm extends org.apache.struts.action.ActionForm {
    

    private long idFornitore;
    private long idOrdine;
    private Collection<Fornitore> fornitori;

    private Collection<OrdineEsterno> ordini;

    
    public Collection<Fornitore> getFornitori() {
        return fornitori;
    }

    public void setFornitori(Collection<Fornitore> fornitori) {
        this.fornitori = fornitori;
    }

    public long getIdFornitore() {
        return idFornitore;
    }

    public void setIdFornitore(long idFornitore) {
        this.idFornitore = idFornitore;
    }

    public long getIdOrdine() {
        return idOrdine;
    }

    public void setIdOrdine(long idOrdine) {
        this.idOrdine = idOrdine;
    }

    public Collection<OrdineEsterno> getOrdini() {
        return ordini;
    }

    public void setOrdini(Collection<OrdineEsterno> ordini) {
        this.ordini = ordini;
    }




    /**
     *
     */
    public RicercaOrdineForm() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    @Override
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
        if (false) { //test validazione
            errors.add("name", new ActionMessage("error.name.required"));
            // TODO: add 'error.name.required' key to your resources
        }
        return errors;
    }


    /* Prova per Strunts-Layout */
	private Datagrid datagrid;

	public void setDatagrid(Datagrid in_datagrid) {
		datagrid = in_datagrid;
	}
	public Datagrid getDatagrid() {
		return datagrid;
	}


}
